package midone.exchangeskill.main.dagger;

import dagger.Module;
import dagger.Provides;
import midone.exchangeskill.main.scope.ActivityScope;
import midone.exchangeskill.main.contract.MainActivityContract;
import midone.exchangeskill.main.presenter.MainActivityPresenterImpl;
import midone.exchangeskill.main.view.MainActivity;

/**
 * Created by NekoNeko on 2016/11/7.
 */
@ActivityScope
@Module
public class MainActivityModule {
    MainActivity mainActivity;

    public MainActivityModule(MainActivity mainActivity) {
        this.mainActivity = mainActivity;
    }

    @ActivityScope
    @Provides
    public MainActivity providersMainActivity() {
        return mainActivity;
    }

    @ActivityScope
    @Provides
    public MainActivityContract.MainActivityPresenter providersMainActivityPresenter(MainActivity mainActivity) {
        return new MainActivityPresenterImpl(mainActivity);
    }
}
